'use strict';

import { Application } from 'egg'

const apiHeader = '/api/global'

const getApi = (path: string) => {
  return `${apiHeader}/${path}`
}

export default (app: Application) => {
  const { router, controller } = app;

  router.get(getApi('csrf'), controller.csrf.update);
  router.get(getApi('uuid'), controller.uuid.getUUID);
  router.get(getApi('verification-code'), controller.user.verificationCode);
};
